import java.util.Scanner;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        float a = in.nextFloat();
        String b = in.next();
        int price = 20;
        if(a > 1.0) {
            //超出部分的实际计重质量
            int m = (a-1) % 1 == 0? (int)(a-1):(int)a;
            price += m*1;
        }
        if(b.equals("y")) {
            price += 5;
        }
        System.out.println(price);
    }
}